<?php
if (!defined("EXE"))
{
	echo "khong co quyen truy xuat";
	exit;	
}
$obj = new db();
$masp = utils::getIndex("idpro");
$sql="select tensp, Macha, sanpham.maloai,hinh from sanpham, loaisanpham where
	   sanpham.maloai=loaisanpham.maloai";
$sql .=" and masp='$masp' ";
echo $sql;

$result= $obj->query($sql);

echo "Tổng: ". $obj->getRowCount()." sản phẩm";
?>
<div class="left_side">
    <div class="chitiet">
    <?php 
	if($obj->getRowCount()>0)
	{
		$row = $result[0];
		echo $row["tensp"];
  	     ?>
        <div class="infor">
            <div class="picture">
                 <img src="<?php echo BASE_URL;?>images/sanpham/<?php echo $row["Macha"];?>/
				 <?php echo $row["maloai"];?>/<?php echo $row["hinh"];?>"/>
            </div>
            
        </div>
    </div>
	    <?php 
		}
		?>
 </div>
